﻿@page
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers

@functions {
        public class Post
        {
            public int Id { get; set; }
            public string Title { get; set; }
        }
        public Post post = new Post { Id = 2, Title = "Post title" };
}

<a asp-route-page="/Show" asp-route-id="@post.Id">@post.Title</a>

<!-- Tests that RazorPage includes InvalidTagHelperIndexerAssignment which is called when the page has an indexer
     Issue https://github.com/aspnet/Mvc/issues/5920 -->
